Optimal. Leaf size=104 \[ \frac {\tan (e+f x) (a \sec (e+f x)+a)^{m+1} (c-c \sec (e+f x))^{-m-2}}{a f \left (4 m^2+8 m+3\right )}-\frac {\tan (e+f x) (a \sec (e+f x)+a)^m (c-c \sec (e+f x))^{-m-2}}{f (2 m+1)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.22, antiderivative size = 104, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {3951, 3950} \[ \frac {\tan (e+f x) (a \sec (e+f x)+a)^{m+1} (c-c \sec (e+f x))^{-m-2}}{a f \left (4 m^2+8 m+3\right )}-\frac {\tan (e+f x) (a \sec (e+f x)+a)^m (c-c \sec (e+f x))^{-m-2}}{f (2 m+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3950
Rule 3951
Rubi steps
\begin {align*} \int \sec (e+f x) (a+a \sec (e+f x))^m (c-c \sec (e+f x))^{-2-m} \, dx &=-\frac {(a+a \sec (e+f x))^m (c-c \sec (e+f x))^{-2-m} \tan (e+f x)}{f (1+2 m)}-\frac {\int \sec (e+f x) (a+a \sec (e+f x))^{1+m} (c-c \sec (e+f x))^{-2-m} \, dx}{a (1+2 m)}\\ &=-\frac {(a+a \sec (e+f x))^m (c-c \sec (e+f x))^{-2-m} \tan (e+f x)}{f (1+2 m)}+\frac {(a+a \sec (e+f x))^{1+m} (c-c \sec (e+f x))^{-2-m} \tan (e+f x)}{a f \left (3+8 m+4 m^2\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 3.05, size = 250, normalized size = 2.40 \[ \frac {i 2^{m+3} \left (1+e^{i (e+f x)}\right ) \left (-i e^{-\frac {1}{2} i (e+f x)} \left (-1+e^{i (e+f x)}\right )\right )^{-2 m} \left (\frac {e^{i (e+f x)}}{1+e^{2 i (e+f x)}}\right )^{-m} \left (\frac {\left (1+e^{i (e+f x)}\right )^2}{1+e^{2 i (e+f x)}}\right )^m \left ((m+1) e^{2 i (e+f x)}-e^{i (e+f x)}+m+1\right ) \sin ^{2 (m+2)}\left (\frac {1}{2} (e+f x)\right ) \sec ^{m+2}(e+f x) (\sec (e+f x)+1)^{-m} (a (\sec (e+f x)+1))^m (c-c \sec (e+f x))^{-m-2}}{f (2 m+1) (2 m+3) \left (-1+e^{i (e+f x)}\right )^3} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.46, size = 93, normalized size = 0.89 \[ -\frac {{\left (2 \, {\left (m + 1\right )} \cos \left (f x + e\right ) - 1\right )} \left (\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}\right )^{m} \left (\frac {c \cos \left (f x + e\right ) - c}{\cos \left (f x + e\right )}\right )^{-m - 2} \sin \left (f x + e\right )}{{\left (4 \, f m^{2} + 8 \, f m + 3 \, f\right )} \cos \left (f x + e\right )^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (a \sec \left (f x + e\right ) + a\right )}^{m} {\left (-c \sec \left (f x + e\right ) + c\right )}^{-m - 2} \sec \left (f x + e\right )\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 3.81, size = 0, normalized size = 0.00 \[ \int \sec \left (f x +e \right ) \left (a +a \sec \left (f x +e \right )\right )^{m} \left (c -c \sec \left (f x +e \right )\right )^{-2-m}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.83, size = 107, normalized size = 1.03 \[ -\frac {{\left (\left (-a\right )^{m} {\left (2 \, m + 1\right )} - \frac {\left (-a\right )^{m} {\left (2 \, m + 3\right )} \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )} c^{-m - 2} {\left (\cos \left (f x + e\right ) + 1\right )}^{3}}{2 \, {\left (4 \, m^{2} + 8 \, m + 3\right )} f \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )^{2 \, m} \sin \left (f x + e\right )^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.00, size = 145, normalized size = 1.39 \[ \frac {\sin \left (e+f\,x\right )\,{\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )}^m\,1{}\mathrm {i}}{f\,{\cos \left (e+f\,x\right )}^2\,{\left (c-\frac {c}{\cos \left (e+f\,x\right )}\right )}^{m+2}\,\left (m^2\,4{}\mathrm {i}+m\,8{}\mathrm {i}+3{}\mathrm {i}\right )}-\frac {\sin \left (2\,e+2\,f\,x\right )\,\left (2\,m+2\right )\,{\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )}^m\,1{}\mathrm {i}}{2\,f\,{\cos \left (e+f\,x\right )}^2\,{\left (c-\frac {c}{\cos \left (e+f\,x\right )}\right )}^{m+2}\,\left (m^2\,4{}\mathrm {i}+m\,8{}\mathrm {i}+3{}\mathrm {i}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________